﻿namespace Tools.Android
{
    public static class DictionaryMappings
    {
        // MySQL数据类型到Java类型的映射
        public static readonly Dictionary<string, string> AndroidStudioDictionaryTypeMap = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase)
        {
            {"INT", "Integer"},
            {"BIGINT", "Long"},
            {"VARCHAR", "String"},
            {"TEXT", "String"},
            {"DATETIME", "Date"},
            {"TIMESTAMP", "Date"},
            {"DECIMAL", "BigDecimal"},
            {"DOUBLE", "Double"},
            {"BOOLEAN", "Boolean"},
            {"BLOB", "byte[]"}
        };

        // MySQL数据类型到VSCode类型的映射
        public static readonly Dictionary<string, string> VsCodeDictionaryTypeMap = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase)
        {
            {"INT", "number"},
            {"BIGINT", "number"},
            {"TINYINT", "number"},
            {"SMALLINT", "number"},
            {"MEDIUMINT", "number"},
            {"FLOAT", "number"},
            {"DOUBLE", "number"},
            {"DECIMAL", "number"},


            {"VARCHAR", "string"},
            {"TEXT", "string"},

            {"DATETIME", "Date"},
            {"TIMESTAMP", "Date"},
            {"DATE", "Date"},
            {"TIME", "Date"},
            {"YEAR", "Date"},


            {"BOOLEAN", "boolean"},
            {"BIT", "boolean"},
        };
    }
}
